/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.school.entity;

import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.util.Date;

/**
 * schoolEntity
 * @author cxy
 * @version 2019-04-10
 */
@Table(name="applet_school", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="name", attrName="name", label="名称", comment="名称（学校，企业）", queryType=QueryType.LIKE),
		@Column(name="province", attrName="province", label="省"),
		@Column(name="city", attrName="city", label="市"),
		@Column(name="county", attrName="county", label="县/区"),
		@Column(name="area", attrName="area", label="省市后的具体区域", queryType=QueryType.LIKE),
		@Column(name="level", attrName="level", label="星级"),
		@Column(name="picture_url", attrName="pictureUrl", label="图片地址"),
		@Column(name="create_by", attrName="createBy", label="创建者", isUpdate=false, isQuery=false),
		@Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false),
		@Column(name="update_by", attrName="updateBy", label="更新者", isQuery=false),
		@Column(name="update_date", attrName="updateDate", label="更新时间", isQuery=false),
		@Column(name="remarks", attrName="remarks", label="备注信息", queryType=QueryType.LIKE),
		@Column(name="longitude", attrName="longitude", label="经度"),
		@Column(name="latitude", attrName="latitude", label="纬度"),
		@Column(name="owner", attrName="owner", label="法人代表"),
		@Column(name="content", attrName="content", label="经营项目"),
		@Column(name="supervisor", attrName="supervisor", label="日常监督机构"),
		@Column(name="card_start_date", attrName="cardStartDate", label="发证日期"),
		@Column(name="card_end_date", attrName="cardEndDate", label="证书有效期"),
		@Column(name="start_time", attrName="startTime", label="营业开始时间"),
		@Column(name="end_time", attrName="endTime", label="营业结束时间"),
		@Column(name="open_type", attrName="openType", label="开放类型"),
		@Column(name="qualification", attrName="qualification", label="资质证明"),
		@Column(name="health_card", attrName="healthCard", label="健康证"),
		@Column(name="manager", attrName="manager", label="食安管理员"),
		@Column(name="promise", attrName="promise", label="食安承诺书"),
		@Column(name="source", attrName="source", label="供应来源"),
	}, orderBy="a.update_date DESC"
)
public class School extends DataEntity<School> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 名称（学校，企业）
	private String province;		// 省
	private String city;		// 市
	private String area;		// 省市后的具体区域
	private Integer level;		// 星级
	private String pictureUrl;		// 图片地址
	private String longitude;
	private String latitude;
	private String owner;
	private String content;
	private String supervisor;
	private Date cardStartDate;
	private Date cardEndDate;
	private Date startTime;
	private Date endTime;
	private Integer openType;
	private String qualification;
	private String healthCard;
	private String manager;
	private String promise;
	private String source;
	private String county;

	public String getCounty() {
		return county;
	}

	public void setCounty(String county) {
		this.county = county;
	}

	public String getQualification() {
		return qualification;
	}

	public void setQualification(String qualification) {
		this.qualification = qualification;
	}

	public String getHealthCard() {
		return healthCard;
	}

	public void setHealthCard(String healthCard) {
		this.healthCard = healthCard;
	}

	public String getManager() {
		return manager;
	}

	public void setManager(String manager) {
		this.manager = manager;
	}

	public String getPromise() {
		return promise;
	}

	public void setPromise(String promise) {
		this.promise = promise;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public Integer getOpenType() {
		return openType;
	}

	public void setOpenType(Integer openType) {
		this.openType = openType;
	}

	public String getOwner() {
		return owner;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getSupervisor() {
		return supervisor;
	}

	public void setSupervisor(String supervisor) {
		this.supervisor = supervisor;
	}

	public Date getCardStartDate() {
		return cardStartDate;
	}

	public void setCardStartDate(Date cardStartDate) {
		this.cardStartDate = cardStartDate;
	}

	public Date getCardEndDate() {
		return cardEndDate;
	}

	public void setCardEndDate(Date cardEndDate) {
		this.cardEndDate = cardEndDate;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public String getLongitude() {
		return longitude;
	}

	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}

	public String getLatitude() {
		return latitude;
	}

	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}

	public School() {
		this(null);
	}

	public School(String id){
		super(id);
	}
	
	@NotBlank(message="名称不能为空")
	@Length(min=0, max=255, message="名称长度不能超过 255 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotBlank(message="省不能为空")
	@Length(min=0, max=10, message="省长度不能超过 10 个字符")
	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}
	
	@NotBlank(message="市不能为空")
	@Length(min=0, max=10, message="市长度不能超过 10 个字符")
	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}
	
	@NotBlank(message="省市后的具体区域不能为空")
	@Length(min=0, max=255, message="省市后的具体区域长度不能超过 255 个字符")
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}
	
	@NotNull(message="星级不能为空")
	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}
	
	@Length(min=0, max=2555, message="图片地址长度不能超过 2555 个字符")
	public String getPictureUrl() {
		return pictureUrl;
	}

	public void setPictureUrl(String pictureUrl) {
		this.pictureUrl = pictureUrl;
	}
	
}